1. Field of the Invention
A certain aspect of the present invention relates to an image processing apparatus, a serial bus control method, and a storage medium.
2. Description of the Related Art
Nowadays, in terms of reducing the emission of carbon dioxide that causes global warming and of reducing operational costs, reducing power consumption is an important factor in designing devices. This also applies to image processing apparatuses such as a multifunction printer including scanning, printing, and facsimile functions. For example, there are image processing apparatuses having a power saving mode (may also be called an energy saving mode and a sleep mode) for maintaining the power consumption at a low level. In a typical image processing apparatus having a power saving mode, if no request is entered for a predetermined period of time, power supply to a main CPU for controlling the entire system during a normal power mode is stopped and the control is passed to a sub CPU that uses less power to reduce the total power consumption.
Meanwhile, recent image processing apparatuses normally support universal serial bus (USB) that is a serial bus standard (general purpose interface standard) used to connect external or peripheral devices called USB devices. USB has been one of the most popular general purpose interfaces in these years and is widely used to connect external devices.
In order for an external device connected to a USB port to be recognized as a USB device by plug and play, a series of configuration processes such as bus reset, address setting, and device configuration have to be performed. For example, when an external device is connected to a USB port of an image processing apparatus and its bias voltage is detected, a bus reset is initiated and an address is assigned to a device node for the external device within a predetermined period of time.
In the above process, if the image processing apparatus is in the power saving mode when the external device is connected to the USB port, the image processing apparatus switches from the power saving mode to the normal power mode and the main CPU is turned on. However, if the mode switching is not completed within a predetermined period of time, the image processing apparatus cannot respond to the inquiry from the external device in time (the transaction times out) and the external device may hang up.
Patent document 1 discloses an electronic device and an operational mode control method of the electronic device where the bias voltage of an external device connected to an IEEE1394 serial bus is detected when the electronic device is turned on to prevent the hang-up of a communication system.
[Patent document 1] Japanese Patent No. 3348331
However, the invention of patent document 1 relates to a control method at start-up of an electronic device. Meanwhile, unlike other electronic devices, an image processing apparatus such as a multifunction printer is almost always turned on particularly in offices so that it is available all the time. Nevertheless, such an image processing apparatus normally has a power saving mode to reduce power consumption. In this case, it is desired to design the image processing apparatus such that it can quickly switch from the power saving mode to the normal power mode when an external device is inserted into a USB port during the power saving mode and the external device can be reliably connected to the image processing apparatus.